import axios from './axios'

// 获取操作员数组 true:已入 false:未入
export function alreadyOperatoryCommandList(params){
  return axios({
    url:'/operatory-command/alreadyOperatoryCommandList',
    params
  })
}

// 添加职员进入操作员
export function operatoryCommand(params){
  return axios({
    method:'post',
    url:'/operatory-command/operatoryCommand',
    params
  })
}

// 更新/移除操作员
export function operatoryModify(data){
  return axios({
    method:'put',
    url:'/operatory-command/operatoryModify',
    data
  })
}

// 获取用户已有的权限集合
export function alreadyPermissionList(params){
  return axios({
    url:'/role-permission/alreadyPermissionList',
    params
  })
}

// 获取当前用户版本下的所有菜单数组(权限设置)
export function allPermissionList(){
  return axios({
    url:'/permission/allPermissionList'
  })
}

// 获取默认角色权限数组
export function getRolePermissionList(){
  return axios({
    url:'/role-permission/defaultRolePermissionList'
  })
}

// 新增角色默认权限
export function postRolePermissionList(params){
  return axios({
    method:'post',
    url:'/role-permission/defaultRolePermission',
    params
  })
}

// 更新用户权限
export function modifyPermission(data){
  return axios({
    method:'put',
    url:'/role-permission/modifyPermission',
    data
  })
}

// 查询操作记录
export function getList(params){
  return axios({
    url:'/operating-record-total/getList',
    params
  })
}

// 系统设置查询
export function getSystemConfig(){
  return axios({
    url:'/system-config/get'
  })
}

// 系统设置新增
export function postSystemConfig(data){
  return axios({
    method:'post',
    url:'/system-config/inset',
    data
  })
}

// 系统设置修改
export function putSystemConfig(data){
  return axios({
    method:'put',
    url:'/system-config/update',
    data
  })
}

// 授权
// 201 人数上限
// 200
// 11500
export function warrant(params){
  return axios({
    method:'put',
    url:'/operatory-command/warrant',
    params
  })
}
